<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //普通函数
    const fn = function () {
      console.log(1);
    }
    fn()
    //1.箭头函数基本语法
    const fa = () => {
      console.log(1);
    }
    fa()
    //2.只有一个参数可以省略小括号
    const fb = x => {
      console.log(1);
    }
    fb()
    //3.只有一行代码可以写一行
    const fc = x => console.log(1);
    fc()
    //4.小括号字面量表达式
    const fd = uname => ({ uname: uname })
    console.log(fd('dage'))

    const fe = (uname) => ({ uname: uname })
    console.log(fe('刘德华'))
  </script>
</body>

</html>